home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / lpr / lp.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-02-16  |  3.4 KB  |  99 lines

  1. /*
  2.  * Copyright (c) 1983 Regents of the University of California.
  3.  * All rights reserved.
  4.  *
  5.  * Redistribution and use in source and binary forms are permitted
  6.  * provided that this notice is preserved and that due credit is given
  7.  * to the University of California at Berkeley. The name of the University
  8.  * may not be used to endorse or promote products derived from this
  9.  * software without specific prior written permission. This software
  10.  * is provided ``as is'' without express or implied warranty.
  11.  *
  12.  *    @(#)lp.h    5.2 (Berkeley) 5/5/88
  13.  */
  14.  
  15. /*
  16.  * Global definitions for the line printer system.
  17.  */
  18.  
  19. #include <stdio.h>
  20. #include <sys/param.h>
  21. #include <sys/file.h>
  22. #include <sys/dir.h>
  23. #include <sys/stat.h>
  24. #include <sys/socket.h>
  25. /* #include <sys/un.h> */
  26. #include <netinet/in.h>
  27. #include <netdb.h>
  28. #include <pwd.h>
  29. #include <syslog.h>
  30. #include <signal.h>
  31. #include <sys/wait.h>
  32. #include <sgtty.h>
  33. #include <ctype.h>
  34. #include <errno.h>
  35. #include "lp.local.h"
  36.  
  37. extern int    DU;        /* daeomon user-id */
  38. extern int    MX;        /* maximum number of blocks to copy */
  39. extern int    MC;        /* maximum number of copies allowed */
  40. extern char    *LP;        /* line printer device name */
  41. extern char    *RM;        /* remote machine name */
  42. extern char    *RG;        /* restricted group */
  43. extern char    *RP;        /* remote printer name */
  44. extern char    *LO;        /* lock file name */
  45. extern char    *ST;        /* status file name */
  46. extern char    *SD;        /* spool directory */
  47. extern char    *AF;        /* accounting file */
  48. extern char    *LF;        /* log file for error messages */
  49. extern char    *OF;        /* name of output filter (created once) */
  50. extern char    *IF;        /* name of input filter (created per job) */
  51. extern char    *RF;        /* name of fortran text filter (per job) */
  52. extern char    *TF;        /* name of troff(1) filter (per job) */
  53. extern char    *NF;        /* name of ditroff(1) filter (per job) */
  54. extern char    *DF;        /* name of tex filter (per job) */
  55. extern char    *GF;        /* name of graph(1G) filter (per job) */
  56. extern char    *VF;        /* name of raster filter (per job) */
  57. extern char    *CF;        /* name of cifplot filter (per job) */
  58. extern char    *FF;        /* form feed string */
  59. extern char    *TR;        /* trailer string to be output when Q empties */
  60. extern short    SC;        /* suppress multiple copies */
  61. extern short    SF;        /* suppress FF on each print job */
  62. extern short    SH;        /* suppress header page */
  63. extern short    SB;        /* short banner instead of normal header */
  64. extern short    HL;        /* print header last */
  65. extern short    RW;        /* open LP for reading and writing */
  66. extern short    PW;        /* page width */
  67. extern short    PX;        /* page width in pixels */
  68. extern short    PY;        /* page length in pixels */
  69. extern short    PL;        /* page length */
  70. extern short    BR;        /* baud rate if lp is a tty */
  71. extern int    FC;        /* flags to clear if lp is a tty */
  72. extern int    FS;        /* flags to set if lp is a tty */
  73. extern int    XC;        /* flags to clear for local mode */
  74. extern int    XS;        /* flags to set for local mode */
  75. extern short    RS;        /* restricted to those with local accounts */
  76.  
  77. extern char    line[BUFSIZ];
  78. extern char    pbuf[];        /* buffer for printcap entry */
  79. extern char    *bp;        /* pointer into ebuf for pgetent() */
  80. extern char    *name;        /* program name */
  81. extern char    *printer;    /* printer name */
  82. extern char    host[32];    /* host machine name */
  83. extern char    *from;        /* client's machine name */
  84. extern int    errno;
  85.  
  86. /*
  87.  * Structure used for building a sorted list of control files.
  88.  */
  89. struct queue {
  90.     time_t    q_time;            /* modification time */
  91.     char    q_name[MAXNAMLEN+1];    /* control file name */
  92. };
  93.  
  94. char    *pgetstr();
  95. char    *malloc();
  96. char    *getenv();
  97. char    *index();
  98. char    *rindex();
  99.